<template>
	<view class="b_width hui">
		<view class="form_box">
			
			<view class="xx_box">
				<view class="input_box">
					<textarea class="ms" v-model="form.name" placeholder="请输入发布内容" placeholder-style="color:#CECECE"></textarea>
				</view>
				
			</view>

            <view class="xx_box">
				<view class="input_box">
					<view class="b_flex_c">
						<view class="img_text">上传图片/视频</view>
					</view>
					<view class="upload_box">
						<upload vmax='1' v-model="form.images"></upload>
					</view>
				</view>
			</view>			

			<view class="sumbit" @click="submit">确定发布</view>
		</view>


	</view>
</template>

<script>
	import upload from "@/components/upload.vue";
	export default {
		components: {
			upload
		},
		data() {
			return {
				form: {
					name:'',
					images:''
				}
			}
		},
		onLoad(e) {
         
		 if(e.title){
			 uni.setNavigationBarTitle({
			 	title:e.title
			 })
		 }

		},
		onShow() {
			
		},
		methods: {
			submit() {
				this.$post(this.$api.qzAdd, this.form, res => {
					if (res.data.code == 1) {
						
						this.$Toast(res.data.msg);
						
						setTimeout(()=>{
							this.$project.toBack();
						},1000);
						
						
						
					} else {
						this.$Toast(res.data.msg);
					}

				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	::v-deep {
		.u-radio__label {
			margin-right: 0 !important;
		}

		.u-radio__icon-wrap {
			margin-left: 20rpx;
		}
	}

	.b_width {
		width: 100%;
	}

	.hui {
		background: #EEEEEE;
		min-height: 100vh;
	}

	.form_box {
		box-sizing: border-box;
		padding: 30rpx 20rpx;
		font-size: 28rpx;
	}

	.xx_box {
		box-sizing: border-box;
		padding: 0rpx 30rpx;
		background-color: #fff;
		border-radius: 15rpx;
		margin-bottom: 30rpx;
	}

	.radio {
		display: inline-block;
	}

	.sex_box {
		margin-left: auto;
		display: flex;
		align-items: center;
	}

	.xx_title {
		font-size: 32rpx;
		margin-bottom: 20rpx;
	}

	.i_right {
		text-align: right;
		margin-left: auto;
	}

	.l_icon {
		margin-left: 10rpx;
		width: 28rpx;
		height: 28rpx;
	}

	.bz_box {

		box-sizing: border-box;
		padding: 0 0 25rpx 0;
		border-bottom: 1rpx solid #EFEFEF;
	}

	.input_box {
		box-sizing: border-box;
		padding: 30rpx 0;
	}
	.tx_box{
		box-sizing: border-box;
		padding: 30rpx 0 0 0;
	}

	.i_b_b {
		border-bottom: 1rpx solid #EFEFEF;
	}


	.upload_box {
		box-sizing: border-box;
		padding: 30rpx 0 0 0;
	}

	.b_flex_c {
		display: flex;
		align-items: center;
	}

	.b_red {
		color: red;
	}

	.b_f_w {
		font-weight: bold;
	}

	.xing {
		width: 18rpx;
		box-sizing: border-box;
		padding: 10rpx 0 0 0;
	}

	.left {
		width: 20%;
		display: flex;
		justify-content: flex-end;
		margin-right: 6%;
	}

	.tc_box {
		width: 50%;
		text-align: center;
	}
	
	input{
		font-size: 28rpx;
		width: 70%;
	}

	.sumbit {
		width: 90%;
		height: 70rpx;
		line-height: 70rpx;
		text-align: center;
		background-color: #E59F0B;
		color: #fff;
		border-radius: 45rpx;
		margin: 40rpx auto 0 auto;
	}

	.map_box {
		font-size: 30rpx;
	}

	.shen_box {
		display: flex;
		justify-content: center;
		flex-direction: column;
		align-items: center;
		height: 100vh;
	}

	.right_icon {
		margin-left: auto;
	}
	.ms{
		height: 200rpx;
	}
	.img_text{
		margin-left: 10rpx;
	}
</style>